<template>
  <div class="div-section product">
    <ul class="flower-list">
      <li v-for="(item,index) in total">
        <router-link :to="'/elsa/'+item.id+'/'+item.name" :class="'flower-content'">
          <div class="flower-img">
            <img :src="item.pic">
          </div>
          <div class="flower-text">
            <p class="flower-tag"
               v-show="item.tag">{{item.tag}}</p>
            <p :class="item.tag? 'flower-name text-overflow':'flower-name'">{{item.name}}</p>
            <div class="product-bottom flower-bottom">
              <p class="price">{{item.price}}
              </p>
            </div>
          </div>
        </router-link>
      </li>
    </ul>
  </div>

</template>
<script>
export default {
  data(){
     return{
      pro:''
     }
  },
  props: ['total','prop'],
  mounted () {
  },
  watch:{
    total(){
       console.log(this.prop);
    }
  }

}

</script>
<style  scoped>
.text-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.div-section {
  padding: 0px 10px 0px 10px;
  padding-bottom: 1.14rem;
  background: #e9ecf0;
}
.product {
  margin-top: 0.57rem;
}
.product h2 {
  text-align: center;
  padding: 20px 0px 20px 0px;
}
.flower-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  /* align-items: flex-start; */
  justify-content: space-between;
}
.flower-list li {
  background: white;
  width: 48.8%;
  margin-bottom: 0.5rem !important;
  border-radius: 0.28571429rem;
}
/* .flower-list li:nth-of-type(2n){
  
} */
.flower-content {
  color: inherit;
  display: block;
  text-decoration: none;
}

.flower-img img {
  width: 100%;
  display: block;
}
.flower-text {
  padding: 0.57rem 0.57em 1.14rem;
}
.flower-tag {
  display: inline-block;
  border-radius: 10rem;
  border: 1px solid #ff734c;
  color: #ff734c;
  font-size: 0.71428571rem;
  padding: 0 0.28571429rem;
}
.flower-name {
  color: #71797f;
  font-size: 0.71rem;
}
.flower-bottom {
  margin-top: 0rem;
}
.product-bottom {
  margin-top: 0.5rem;
  position: relative;
}
.price {
  font-size: 0.9rem;
  color: #ff734c;
  font-weight: 400;
}
</style>